<form method="post" id="change_password_form" action="
  {{- is_privileges ? url('/server/privileges') : url('/user-password') }}" name="chgPassword" class="{{ is_privileges ? 'submenu-item' }}" autocomplete="off">
  {{ get_hidden_inputs() }}
  {% if is_privileges %}
    <input type="hidden" name="username" value="{{ username }}">
    <input type="hidden" name="hostname" value="{{ hostname }}">
  {% endif %}

  <div class="card mb-3" id="fieldset_change_password">
    <div class="card-header js-submenu-label" data-submenu-label="{% trans 'Change password' %}">
      {% trans 'Change password' %}
    </div>
    <div class="card-body">
    <table class="table-borderless" style="background: transparent;">
      <tr class="mb-4">
        <td colspan="3">
          <input type="radio" name="nopass" value="1" id="nopass_1">
          <label for="nopass_1">{% trans 'No Password' %}</label>
        </td>
      </tr>
      <tr class="align-middle mb-4">
        <td>
          <input type="radio" name="nopass" value="0" id="nopass_0" checked>
          <label for="nopass_0">{% trans 'Password:' %}&nbsp;</label>
        </td>
        <td>
          <div class="row">
            <span class="d-flex align-items-center col-4">{% trans 'Enter:' %}</span>
            <input type="password" name="pma_pw" id="text_pma_change_pw" size="10" class="textfield col-6" spellcheck="false" autocomplete="new-password">
          </div>
          <div class="row mt-2">
            <span class="d-flex align-items-center col-4">{% trans 'Re-type:' %}</span>
            <input type="password" name="pma_pw2" id="text_pma_change_pw2" size="10" class="textfield col-6" spellcheck="false" autocomplete="new-password">
          </div>
        </td>
        <td class="col-2">
          <div>
            <span>{% trans %}Strength:{% context %}Password strength{% endtrans %}</span>
            <meter max="4" id="change_password_strength_meter" name="pw_meter"></meter>
          </div>
          <span id="change_password_strength" name="pw_strength"></span>
        </td>
      </tr>

      {% if not is_new or (is_new and has_more_auth_plugins) %}
        <tr class="align-middle mb-4">
          <td>
            <label for="select_authentication_plugin_cp">{% trans 'Password Hashing:' %}</label>
          </td>
          <td colspan="2">
            <select name="authentication_plugin" id="select_authentication_plugin_cp" class="col-8">
              {% for plugin_name, plugin_description in active_auth_plugins %}
                <option value="{{ plugin_name }}"{{ plugin_name == orig_auth_plugin ? ' selected' }}>{{ plugin_description }}</option>
              {% endfor %}
            </select>
          </td>
        </tr>
      {% endif %}

      <tr id="tr_element_before_generate_password"></tr>
    </table>

    {% if is_new and has_more_auth_plugins %}
      <div{{ orig_auth_plugin != 'sha256_password' ? ' class="hide"' }} id="ssl_reqd_warning_cp">
        {% apply notice %}
          {% trans %}
            This method requires using an '<i>SSL connection</i>' or an '<i>unencrypted connection that encrypts the password using RSA</i>'; while connecting to the server.
          {% endtrans %}
          {{ show_mysql_docu('sha256-authentication-plugin') }}
        {% endapply %}
      </div>
    {% endif %}
    </div>

  </div>

  <div id="fieldset_change_password_footer">
    <input type="hidden" name="change_pw" value="1">
    <input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
  </div>
</form>
